
SPATH = ./src
SHAREDC = $(SPATH)/*.c
LDFLAGS= -lSDL
CFLAGS = -I./include -I/usr/include/SDL
TARGET = librgs.so
SOFLAGS = -shared -Wl,-soname,$(TARGET)
INSTALLPATH = /usr/lib/

default:
	gcc -g -O3 $(SOFLAGS) $(LDFLAGS) $(SHAREDC) $(CFLAGS) -o $(TARGET)
install:
	mkdir -p /usr/include/librgs
	cp ./include/*.h /usr/include/librgs/
	chmod 666 /usr/include/librgs/*.h
	cp $(TARGET) $(INSTALLPATH)
clean:
	rm -f $(TARGET)
